<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<configuration>
  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://<%= @namenode_host %>:8020/user/hbase</value>
  </property>

  <property>
    <name>zookeeper.znode.parent</name>
    <value><%= @zookeeper_znode_parent %></value>
    <description>
      Root ZNode for HBase in ZooKeeper. All of HBase’s ZooKeeper files that are configured with a relative path will go under this node. By default, all of HBase’s ZooKeeper file path are configured with a relative path, so they will all go under this directory unless changed.
    </description>
  </property>
<% if @zookeeper_hosts and !@zookeeper_hosts.empty? -%>
  <property>
    <name>hbase.zookeeper.quorum</name>
    <value><%= @zookeeper_hosts.sort.join(',') %></value>
  </property>
<% end -%>
<% if @zookeeper_port -%>
  <property>
    <name>hbase.zookeeper.property.clientPort</name>
    <value><%= @zookeeper_port %></value>
  </property>
<% end -%>
<% if @zookeeper_session_timeout -%>
  <property>
    <name>zookeeper.session.timeout</name>
    <value><%= @zookeeper_session_timeout %></value>
  </property>
<% end -%>

<% if @hbase_regionserver_codecs -%>
  <property>
    <name>hbase.regionserver.codecs</name>
    <value><%= @hbase_regionserver_codecs.sort.join(',') %></value>
  </property>
<% end -%>
<% if @hbase_regionserver_lease_period -%>
  <property>
    <name>hbase.regionserver.lease.period</name>
    <value><%= @hbase_regionserver_lease_period %></value>
  </property>
<% end -%>

<% if @hbase_client_scanner_caching -%>
  <property>
    <name>hbase.client.scanner.caching</name>
    <value><%= @hbase_client_scanner_caching %></value>
  </property>
<% end -%>
<% if @hbase_client_scanner_timeout_period -%>
  <property>
    <name>hbase.client.scanner.timeout.period</name>
    <value><%= @hbase_client_scanner_timeout_period %></value>
  </property>
<% end -%>
<% if @hbase_client_scanner_max_result_size -%>
  <property>
    <name>hbase.client.scanner.max.result.size</name>
    <value><%= @hbase_client_scanner_max_result_size %></value>
  </property>
<% end -%>
</configuration>
